package com.TPsoft.cafe_server.Database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

import com.TPsoft.cafe_server.Database.CafeServerDatabase.GroupProfileData;

/**
 * The Cafe Server Database Helper that connects our DB and application.
 * 
 * @since 2011/03/27 16:11
 * @author Thomas Hyun Park
 * @version 1.0
 */
public class CafeServerHelper extends SQLiteOpenHelper{
//public class MusicIDDatabaseHelper extends SQLiteOpenHelper{
	
	private static final String TAG = CafeServerHelper.class.getSimpleName();
	
	public CafeServerHelper(Context context, String dbName, int dbVersion) {
		super(context, dbName, null, dbVersion);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
/*
		if (db.getClass().getSimpleName().equalsIgnoreCase(""))
		{
		db.execSQL("CREATE TABLE " + MusicData.RESULT_INFO_TABLE_NAME + " ("
				+ MusicData._ID + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
				+ MusicData.TITLE_CODE + " TEXT ,"
				+ MusicData.TITLE + " TEXT ,"
				+ MusicData.ARTIST_CODE + " TEXT ,"
				+ MusicData.ARTIST + " TEXT ,"
				+ MusicData.ALBUM_CODE + " TEXT ,"
				+ MusicData.ALBUM_NAME + " TEXT ,"
				+ MusicData.ALBUM_URL + " TEXT ,"
				+ MusicData.ALBUM_IMAGE + " BLOB ,"
				+ MusicData.TAGGED_TIME + " INTEGER "
				+ ");"
		);
		}
*/
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
/*
		Log.i(TAG, "Upgrading database from version " + oldVersion + " to "
                + newVersion + ", dropping all tables");
		db.execSQL("DROP TABLE IF EXIST " + MusicData.RESULT_INFO_TABLE_NAME);
		this.onCreate(db);
*/
	}

	@Override
	public void onOpen(SQLiteDatabase db) {
		super.onOpen(db);
	}
}
